import { get, post, put, del } from '../request'

// 蛋糕相关接口
export const cakeApi = {
  //产品相关
  queryCategory: (parentId) => post('/cake-service/mini-program/product/queryCategory', { parentId }),
  queryProductList: (params) => post('/cake-service/mini-program/product/queryProductList', params),
  queryProductDetail: (productId) => post('/cake-service/mini-program/product/queryProductDetail',{ productId }),
  addShoppingCart: (params) => post('/cake-service/mini-program/product/addShoppingCart',params),
  queryShoppingCartCount: (params) => post('/cake-service/mini-program/product/queryShoppingCartCount',params),
  queryShoppingCartList: (params) => post('/cake-service/mini-program/product/queryShoppingCartList',params),
  emptyShoppingCart: (params) => post('/cake-service/mini-program/product/emptyShoppingCart',params),
  updateShoppingCart: (params) => post('/cake-service/mini-program/product/updateShoppingCart',params),
  // get example: 参数会以查询字符串的形式附加在URL后面，如：/cake-service/mini-program/exanple?productId=123456
  example: (productId) => get('/cake-service/mini-program/exanple', { productId })
}

export default cakeApi 